import React from 'react';
import NavBar from "./NavBar";
import NavBarProps from "./NavBarProps";

class Slot extends React.Component {
    render() {
        return (
            <div>
                <h1>插槽的实现</h1>
                <NavBar>
                    <h5>左边的部分</h5>
                    <span>中间的部分</span>
                    <button>右边的部分</button>
                </NavBar>
                <br/>
                <NavBarProps
                    leftSlot={<span>左边的属性slot</span>}
                    centerSlot={<span>中间的属性slot</span>}
                    rightSlot={<span>右边的属性slot</span>}
                />
            </div>
        );
    }
}
export default Slot